package net.oschina.simpleplus.redis;

/**
 * Hello world!
 *
 */
public class App 
{
    public static void main( String[] args )
    {
        JRedis jr = new JRedisProxy(new JRedisShard() {
			
			@Override
			public int shard(byte[] key) {
				return (int) (findUserId(key) % size);
			}
			
			private long findUserId(byte[] key){
				String s = new String(key);
				String[] ss = s.split("_");
				return Long.parseLong(ss[ss.length - 1]);
			}
		},"jedis://127.0.0.1:6379,jedis://127.0.0.1:6380");
        
        
    }
}
